Optimal. Leaf size=172 \[ -\frac {1}{4} \sqrt {1-\frac {1}{\sqrt {2}}} \log \left (x^2-\sqrt {2-\sqrt {2}} x+1\right )+\frac {1}{4} \sqrt {1-\frac {1}{\sqrt {2}}} \log \left (x^2+\sqrt {2-\sqrt {2}} x+1\right )-\frac {\tan ^{-1}\left (\frac {\sqrt {2-\sqrt {2}}-2 x}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2-\sqrt {2}}}+\frac {\tan ^{-1}\left (\frac {2 x+\sqrt {2-\sqrt {2}}}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2-\sqrt {2}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 172, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {1169, 634, 618, 204, 628} \[ -\frac {1}{4} \sqrt {1-\frac {1}{\sqrt {2}}} \log \left (x^2-\sqrt {2-\sqrt {2}} x+1\right )+\frac {1}{4} \sqrt {1-\frac {1}{\sqrt {2}}} \log \left (x^2+\sqrt {2-\sqrt {2}} x+1\right )-\frac {\tan ^{-1}\left (\frac {\sqrt {2-\sqrt {2}}-2 x}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2-\sqrt {2}}}+\frac {\tan ^{-1}\left (\frac {2 x+\sqrt {2-\sqrt {2}}}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2-\sqrt {2}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 628
Rule 634
Rule 1169
Rubi steps
\begin {align*} \int \frac {\sqrt {2}+x^2}{1+\sqrt {2} x^2+x^4} \, dx &=\frac {\int \frac {\sqrt {2 \left (2-\sqrt {2}\right )}-\left (-1+\sqrt {2}\right ) x}{1-\sqrt {2-\sqrt {2}} x+x^2} \, dx}{2 \sqrt {2-\sqrt {2}}}+\frac {\int \frac {\sqrt {2 \left (2-\sqrt {2}\right )}+\left (-1+\sqrt {2}\right ) x}{1+\sqrt {2-\sqrt {2}} x+x^2} \, dx}{2 \sqrt {2-\sqrt {2}}}\\ &=\frac {\left (1-\sqrt {2}\right ) \int \frac {-\sqrt {2-\sqrt {2}}+2 x}{1-\sqrt {2-\sqrt {2}} x+x^2} \, dx}{4 \sqrt {2-\sqrt {2}}}+\frac {\left (-1+\sqrt {2}\right ) \int \frac {\sqrt {2-\sqrt {2}}+2 x}{1+\sqrt {2-\sqrt {2}} x+x^2} \, dx}{4 \sqrt {2-\sqrt {2}}}+\frac {1}{4} \sqrt {3+2 \sqrt {2}} \int \frac {1}{1-\sqrt {2-\sqrt {2}} x+x^2} \, dx+\frac {1}{4} \sqrt {3+2 \sqrt {2}} \int \frac {1}{1+\sqrt {2-\sqrt {2}} x+x^2} \, dx\\ &=-\frac {1}{4} \sqrt {1-\frac {1}{\sqrt {2}}} \log \left (1-\sqrt {2-\sqrt {2}} x+x^2\right )+\frac {1}{4} \sqrt {1-\frac {1}{\sqrt {2}}} \log \left (1+\sqrt {2-\sqrt {2}} x+x^2\right )-\frac {1}{2} \sqrt {3+2 \sqrt {2}} \operatorname {Subst}\left (\int \frac {1}{-2-\sqrt {2}-x^2} \, dx,x,-\sqrt {2-\sqrt {2}}+2 x\right )-\frac {1}{2} \sqrt {3+2 \sqrt {2}} \operatorname {Subst}\left (\int \frac {1}{-2-\sqrt {2}-x^2} \, dx,x,\sqrt {2-\sqrt {2}}+2 x\right )\\ &=-\frac {1}{2} \sqrt {\frac {1}{2} \left (2+\sqrt {2}\right )} \tan ^{-1}\left (\frac {\sqrt {2-\sqrt {2}}-2 x}{\sqrt {2+\sqrt {2}}}\right )+\frac {1}{2} \sqrt {\frac {1}{2} \left (2+\sqrt {2}\right )} \tan ^{-1}\left (\frac {\sqrt {2-\sqrt {2}}+2 x}{\sqrt {2+\sqrt {2}}}\right )-\frac {1}{4} \sqrt {1-\frac {1}{\sqrt {2}}} \log \left (1-\sqrt {2-\sqrt {2}} x+x^2\right )+\frac {1}{4} \sqrt {1-\frac {1}{\sqrt {2}}} \log \left (1+\sqrt {2-\sqrt {2}} x+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.04, size = 53, normalized size = 0.31 \[ \frac {\sqrt {1-i} \tan ^{-1}\left (\frac {\sqrt [4]{2} x}{\sqrt {1-i}}\right )+\sqrt {1+i} \tan ^{-1}\left (\frac {\sqrt [4]{2} x}{\sqrt {1+i}}\right )}{2^{3/4}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.45, size = 97, normalized size = 0.56 \[ \frac {1}{4} \, \sqrt {\left (i - 1\right ) \, \sqrt {2}} \log \left (x + \frac {1}{2} \, \sqrt {2} \sqrt {\left (i - 1\right ) \, \sqrt {2}}\right ) - \frac {1}{4} \, \sqrt {\left (i - 1\right ) \, \sqrt {2}} \log \left (x - \frac {1}{2} \, \sqrt {2} \sqrt {\left (i - 1\right ) \, \sqrt {2}}\right ) + \frac {1}{4} \, \sqrt {-\left (i + 1\right ) \, \sqrt {2}} \log \left (x + \frac {1}{2} \, \sqrt {2} \sqrt {-\left (i + 1\right ) \, \sqrt {2}}\right ) - \frac {1}{4} \, \sqrt {-\left (i + 1\right ) \, \sqrt {2}} \log \left (x - \frac {1}{2} \, \sqrt {2} \sqrt {-\left (i + 1\right ) \, \sqrt {2}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 126, normalized size = 0.73 \[ \frac {1}{4} \, \sqrt {2 \, \sqrt {2} + 4} \arctan \left (\frac {2 \, x + \sqrt {-\sqrt {2} + 2}}{\sqrt {\sqrt {2} + 2}}\right ) + \frac {1}{4} \, \sqrt {2 \, \sqrt {2} + 4} \arctan \left (\frac {2 \, x - \sqrt {-\sqrt {2} + 2}}{\sqrt {\sqrt {2} + 2}}\right ) + \frac {1}{8} \, \sqrt {-2 \, \sqrt {2} + 4} \log \left (x^{2} + x \sqrt {-\sqrt {2} + 2} + 1\right ) - \frac {1}{8} \, \sqrt {-2 \, \sqrt {2} + 4} \log \left (x^{2} - x \sqrt {-\sqrt {2} + 2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 199, normalized size = 1.16 \[ \frac {\arctan \left (\frac {2 x -\sqrt {2-\sqrt {2}}}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2+\sqrt {2}}}+\frac {\sqrt {2}\, \arctan \left (\frac {2 x -\sqrt {2-\sqrt {2}}}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2+\sqrt {2}}}+\frac {\arctan \left (\frac {2 x +\sqrt {2-\sqrt {2}}}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2+\sqrt {2}}}+\frac {\sqrt {2}\, \arctan \left (\frac {2 x +\sqrt {2-\sqrt {2}}}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2+\sqrt {2}}}-\frac {\sqrt {2}\, \sqrt {2-\sqrt {2}}\, \ln \left (x^{2}-\sqrt {2-\sqrt {2}}\, x +1\right )}{8}+\frac {\sqrt {2}\, \sqrt {2-\sqrt {2}}\, \ln \left (x^{2}+\sqrt {2-\sqrt {2}}\, x +1\right )}{8} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x^{2} + \sqrt {2}}{x^{4} + \sqrt {2} x^{2} + 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.95, size = 121, normalized size = 0.70 \[ \mathrm {atan}\left (x\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {\sqrt {8}\,1{}\mathrm {i}}{32}}\,2{}\mathrm {i}+\frac {\sqrt {2}\,\sqrt {8}\,x\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {\sqrt {8}\,1{}\mathrm {i}}{32}}}{2}\right )\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {\sqrt {8}\,1{}\mathrm {i}}{32}}\,2{}\mathrm {i}+\mathrm {atan}\left (x\,\sqrt {-\frac {\sqrt {2}}{16}+\frac {\sqrt {8}\,1{}\mathrm {i}}{32}}\,2{}\mathrm {i}-\frac {\sqrt {2}\,\sqrt {8}\,x\,\sqrt {-\frac {\sqrt {2}}{16}+\frac {\sqrt {8}\,1{}\mathrm {i}}{32}}}{2}\right )\,\sqrt {-\frac {\sqrt {2}}{16}+\frac {\sqrt {8}\,1{}\mathrm {i}}{32}}\,2{}\mathrm {i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: PolynomialError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________